From: Roger Pau Monné Date: Tue, 10 Nov 2015 11:07:32 +0000 (+0100) Subject: x86: allow disabling the emulated VGA X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~2285 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=4d81504ff449010daf69d930ebcd2d23b19a1cda;p=xen.git x86: allow disabling the emulated VGA Signed-off-by: Roger Pau Monné Acked-by: Andrew Cooper --- diff --git a/xen/arch/x86/hvm/stdvga.c b/xen/arch/x86/hvm/stdvga.c index 86c94d272a..bd23b52888 100644 --- a/xen/arch/x86/hvm/stdvga.c +++ b/xen/arch/x86/hvm/stdvga.c @@ -578,6 +578,9 @@ void stdvga_init(struct domain *d) struct page_info *pg; unsigned int i; + if ( !has_vvga(d) ) + return; + memset(s, 0, sizeof(*s)); spin_lock_init(&s->lock); @@ -615,6 +618,9 @@ void stdvga_deinit(struct domain *d) struct hvm_hw_stdvga *s = &d->arch.hvm_domain.stdvga; int i; + if ( !has_vvga(d) ) + return; + for ( i = 0; i != ARRAY_SIZE(s->vram_page); i++ ) { if ( s->vram_page[i] == NULL )